﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages.Administration, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> 
<%@ Page Language="C#" Inherits="Components2.JobManager.JobEditPage, Components2.JobManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5" MasterPageFile="~/_admin/admin.master"      %> 
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="AdminControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint.ApplicationPages.Administration" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="~/_controltemplates/ToolBar.ascx" %>

<asp:content ID="Content3" contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
	<SharePoint:HtcMenuClientFiles ID="HtcMenuClientFiles1" runat="server"/>
	<script language="javascript">
		function SelectContentDB(id)
		{
			var url = window.location.href + "";
			url = StURLSetVar2(url, "ContentDB", id);
			STSNavigate(url);
		}
	</script>
</asp:content>

<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
	Manage Timer Job
</asp:content>

<asp:Content contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server">
	Manage Timer Job
</asp:Content>

<asp:content contentplaceholderid="PlaceHolderPageDescription" runat="server">
	Use this page to modify a timer job. "Clone Schedule" to make a copy of the job, scheduled to execute in 15-45s. "Clone One-time" to make a copy of the job using a one-time schedule, executing asap. "Execute" to run the Execute() method of the job, last run time etc is not updated, select the content database to execute in from the toolbar.
</asp:content>

<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
<script>
	function UpdatePage(typeVal) {
		var sLookup = "Lookup";
		var sUser = "User";
		var sLLArg = "&LookupListParam=";
		var sLLVal = "";
		var sPresArg = "&ShowPresence=";
		var sPresVal = "";
		var sURL = window.location + "";
		var sDescriptionArg = "&DescriptionParam=";
		var sNewUrl;
		sNewUrl = StURLSetVar2(sURL, "JobScheduleTypeParam", typeVal);
		sNewUrl = sNewUrl + sLLVal + sPresVal;
		if (sNewUrl.length > 2040)
			document.location.replace(StURLSetVar2(sURL, "JobScheduleTypeParam", typeVal) + sLLVal);
		else
			document.location.replace(sNewUrl);
		return true;
	}
</script>
	
<table width="100%" class="propertysheet" cellspacing="0" cellpadding="0" border="0"> 
    <tr> <td class="ms-descriptionText"> <asp:Label ID="LabelMessage" Runat="server" EnableViewState="False" class="ms-descriptionText"/> </td> </tr>
     <tr> <td class="ms-error"><asp:Label ID="LabelErrorMessage" Runat="server" EnableViewState="False" /></td> </tr>
      <tr> <td class="ms-descriptionText"> <asp:ValidationSummary ID="ValSummary" HeaderText="<%$SPHtmlEncodedResources:spadmin, ValidationSummaryHeaderText%>" DisplayMode="BulletList" ShowSummary="True" runat="server"> </asp:ValidationSummary> </td> </tr> 
      <tr> <td><img src="/_layouts/images/blank.gif" width="10" height="1" alt="" /></td> </tr>
 </table>
 
	<wssuc:ToolBar id="ToolBar" runat="server" CssClass="ms-toolbar"> 
	    <Template_RightButtons> 
            <asp:PlaceHolder runat="server">
			 <table border=0 cellpadding=0 cellspacing=0 style='margin-right: 4px'>
			  <tr>
			   <td>&nbsp;</td>
			   <td nowrap class="ms-listheaderlabel"><wssawc:EncodedLiteral ID="EncodedLiteral2" runat="server" Text="Content Database: " /></td>
			   <td>&nbsp;</td>
			   <td nowrap class="ms-viewselector">
				<SharePoint:Menu id="MenuContentDatabaseSelector" runat="server"
			        TemplateId="MenuContentDatabase"
				    MenuFormat="ArrowAlwaysVisible"
				    HoverCellActiveCssClass = "ms-viewselectorhover"
				    HoverCellInActiveCssClass = "ms-viewselector"
				    ArrowImageUrl="/_layouts/images/blank.gif"
				/>
				<SharePoint:MenuTemplate id="MenuContentDatabase" runat="server">
				</SharePoint:MenuTemplate>
			   </td>
			  </tr>
			  </table>
			</asp:PlaceHolder>
	    </Template_RightButtons>
	</wssuc:ToolBar>
	
	<br/>
	
   <TABLE border="0" cellspacing="0" cellpadding="0" class="ms-propertysheet">

	<wssuc:InputFormSection Title="<%$Resources:spadmin, JobEdit_JobProperties%>" runat="server">
		<Template_description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, JobEdit_JobPropertiesDescription%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
		</Template_description>
		<Template_InputFormControls>
			<tr>
				<td nowrap valign="top"><SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:spadmin, JobEdit_JobTitleName%>" EncodeMethod='HtmlEncode'/></td>
				<td><asp:Label id="LabelJobTitle" runat="server"/>&nbsp;</td>
			</tr>	
			<tr>
				<td nowrap><SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, JobEdit_WebApplication%>" EncodeMethod='HtmlEncode'/></td>
				<td nowrap><asp:Label id="LabelWebApplication" runat="server"/>&nbsp;</td>
			</tr>
			<tr>
				<td><IMG SRC="/_layouts/images/blank.gif" width=1 height=2 alt=""></td>
			</tr>
			<tr>
				<td nowrap><SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, JobEdit_LastRunTime%>" EncodeMethod='HtmlEncode'/></td>
				<td nowrap><asp:Label id="LabelLastRunTime" runat="server"/>&nbsp;</td>
			</tr>
			<tr>
				<td nowrap>Enabled:</td>
				<td nowrap><asp:Label id="LabelEnabled" runat="server"/>&nbsp;</td>
			</tr>
			<tr>
				<td nowrap>Schedule:</td>
				<td nowrap><asp:Label id="LabelSchedule" runat="server"/>&nbsp;</td>
			</tr>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<wssuc:InputFormSection id="SectionScheduleType" Title="Schedule Type" runat="server">
		<Template_Description>
			Modify the job's schedule
		</Template_Description>
		<Template_InputFormControls>
            <wssuc:InputFormControl runat="server" >
	            <Template_control> 
	            
	            
<TABLE border=0 cellspacing=0>
<TR>
<TD colspan=2>
<TABLE width=100% cellpadding=0 cellspacing=1 border=0>
<asp:PlaceHolder runat="server" ID="PHRadioSchedule">
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPYearlySchedule") { %> 
	    <INPUT onClick="UpdatePage('SPYearlySchedule')" type="radio" value="SPYearlySchedule" id=onetidScheduleTypeSPYearlySchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPYearlySchedule')" type="radio" value="SPYearlySchedule" id=onetidScheduleTypeSPYearlySchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD4">
	<LABEL FOR="onetidTypeText"> Yearly</LABEL>
	</TD>
</TR>
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPMonthlySchedule") { %> 
	    <INPUT onClick="UpdatePage('SPMonthlySchedule')" type="radio" value="SPMonthlySchedule" id=onetidScheduleTypeSPMonthlySchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPMonthlySchedule')" type="radio" value="SPMonthlySchedule" id=onetidScheduleTypeSPMonthlySchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD5">
	<LABEL FOR="onetidTypeText"> Monthly</LABEL>
	</TD>
</TR>
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPWeeklySchedule") { %> 
	    <INPUT onClick="UpdatePage('SPWeeklySchedule')" type="radio" value="SPWeeklySchedule" id=onetidScheduleTypeSPWeeklySchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPWeeklySchedule')" type="radio" value="SPWeeklySchedule" id=onetidScheduleTypeSPWeeklySchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD6">
	<LABEL FOR="onetidTypeText"> Weekly</LABEL>
	</TD>
</TR>
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPDailySchedule") { %> 
	    <INPUT onClick="UpdatePage('SPDailySchedule')" type="radio" value="SPDailySchedule" id=onetidScheduleTypeSPDailySchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPDailySchedule')" type="radio" value="SPDailySchedule" id=onetidScheduleTypeSPDailySchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="L_onetidTypeText">
	<LABEL FOR="onetidTypeText"> Daily</LABEL>
	</TD>
</TR>
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPHourlySchedule") { %> 
	    <INPUT onClick="UpdatePage('SPHourlySchedule')" type="radio" value="SPHourlySchedule" id=onetidScheduleTypeSPHourlySchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPHourlySchedule')" type="radio" value="SPHourlySchedule" id=onetidScheduleTypeSPHourlySchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD1">
	<LABEL FOR="onetidTypeText"> Hourly</LABEL>
	</TD>
</TR>
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPMinuteSchedule") { %> 
	    <INPUT onClick="UpdatePage('SPMinuteSchedule')" type="radio" value="SPMinuteSchedule" id=onetidScheduleTypeSPMinuteSchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPMinuteSchedule')" type="radio" value="SPMinuteSchedule" id=onetidScheduleTypeSPMinuteSchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD2">
	<LABEL FOR="onetidTypeText"> Minutes</LABEL>
	</TD>
</TR>
</asp:PlaceHolder>
<asp:PlaceHolder runat="server" ID="PHRadioOneTime">
<TR>
	<TD align="center" class="ms-authoringcontrols" nowrap>
	<% if (ScheduleTypeName == "SPOneTimeSchedule") { %> 
	    <INPUT onClick="UpdatePage('SPOneTimeSchedule')" type="radio" value="SPOneTimeSchedule" id=onetidScheduleTypeSPOneTimeSchedule name="ScheduleType" CHECKED> 
	<% ; } else { %> 
	    <INPUT onClick="UpdatePage('SPOneTimeSchedule')" type="radio" value="SPOneTimeSchedule" id=onetidScheduleTypeSPOneTimeSchedule name="ScheduleType" >
    <% ; } %>
	</TD>
	<TD  class="ms-authoringcontrols" id="TD3">
	<LABEL FOR="onetidTypeText"> One-time</LABEL>
	</TD>
</TR>
</asp:PlaceHolder>
</TABLE>
</TD>
</TR>
</TABLE>
	            </Template_control>
            </wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
    <wssuc:InputFormSection id="SectionScheduleSettings" Title="Additional Schedule Settings" runat="server">
		<Template_Description>
			Specify detailed settings for the schedule you selected.
		</Template_Description>
		<Template_InputFormControls>
            <wssuc:InputFormControl runat="server" LabelText="Begin Day" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="BeginDay" class="ms-input" ID="TxtBeginDay" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Day" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="EndDay" class="ms-input" ID="TxtEndDay" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Begin Day of Week" >
	            <Template_control> 
	                <asp:DropDownList class="ms-input" runat="server" ID="DDLBeginDayOfWeek">
	                    <asp:ListItem>Sunday</asp:ListItem>
	                    <asp:ListItem>Monday</asp:ListItem>
	                    <asp:ListItem>Tuesday</asp:ListItem>
	                    <asp:ListItem>Wednesday</asp:ListItem>
	                    <asp:ListItem>Thursday</asp:ListItem>
	                    <asp:ListItem>Friday</asp:ListItem>
	                    <asp:ListItem>Saturday</asp:ListItem>
	                </asp:DropDownList>
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Day of Week" >
	            <Template_control> 
	                <asp:DropDownList class="ms-input" runat="server" ID="DDLEndDayOfWeek">
	                    <asp:ListItem>Sunday</asp:ListItem>
	                    <asp:ListItem>Monday</asp:ListItem>
	                    <asp:ListItem>Tuesday</asp:ListItem>
	                    <asp:ListItem>Wednesday</asp:ListItem>
	                    <asp:ListItem>Thursday</asp:ListItem>
	                    <asp:ListItem>Friday</asp:ListItem>
	                    <asp:ListItem>Saturday</asp:ListItem>
	                </asp:DropDownList>
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Begin Hour" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="BeginHour" class="ms-input" ID="TxtBeginHour" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Hour" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="EndHour" class="ms-input" ID="TxtEndHour" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Begin Minute" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="BeginMinute" class="ms-input" ID="TxtBeginMinute" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Minute" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="EndMinute" class="ms-input" ID="TxtEndMinute" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Begin Month" >
	            <Template_control> 
	                <asp:DropDownList class="ms-input" runat="server" ID="DDLBeginMonth">
	                    <asp:ListItem Value="1">Jan</asp:ListItem>
	                    <asp:ListItem Value="2">Feb</asp:ListItem>
	                    <asp:ListItem Value="3">Mar</asp:ListItem>
	                    <asp:ListItem Value="4">Apr</asp:ListItem>
	                    <asp:ListItem Value="5">May</asp:ListItem>
	                    <asp:ListItem Value="6">Jun</asp:ListItem>
	                    <asp:ListItem Value="7">Jul</asp:ListItem>
	                    <asp:ListItem Value="8">Aug</asp:ListItem>
	                    <asp:ListItem Value="9">Sep</asp:ListItem>
	                    <asp:ListItem Value="10">Oct</asp:ListItem>
	                    <asp:ListItem Value="11">Nov</asp:ListItem>
	                    <asp:ListItem Value="12">Dec</asp:ListItem>
	                </asp:DropDownList>
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Month" >
	            <Template_control> 
	                <asp:DropDownList class="ms-input" runat="server" ID="DDLEndMonth">
	                    <asp:ListItem Value="1">Jan</asp:ListItem>
	                    <asp:ListItem Value="2">Feb</asp:ListItem>
	                    <asp:ListItem Value="3">Mar</asp:ListItem>
	                    <asp:ListItem Value="4">Apr</asp:ListItem>
	                    <asp:ListItem Value="5">May</asp:ListItem>
	                    <asp:ListItem Value="6">Jun</asp:ListItem>
	                    <asp:ListItem Value="7">Jul</asp:ListItem>
	                    <asp:ListItem Value="8">Aug</asp:ListItem>
	                    <asp:ListItem Value="9">Sep</asp:ListItem>
	                    <asp:ListItem Value="10">Oct</asp:ListItem>
	                    <asp:ListItem Value="11">Nov</asp:ListItem>
	                    <asp:ListItem Value="12">Dec</asp:ListItem>
	                </asp:DropDownList>
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Begin Second" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="BeginSecond" class="ms-input" ID="TxtBeginSecond" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="End Second" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="EndSecond" class="ms-input" ID="TxtEndSecond" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Interval" >
	            <Template_control> 
					<wssawc:InputFormTextBox Title="Interval" class="ms-input" ID="TxtInterval" Columns="35" Runat="server" MaxLength=255 />
	            </Template_control>
            </wssuc:InputFormControl>
            <wssuc:InputFormControl runat="server" LabelText="Time" >
	            <Template_control> 
					<wssawc:DateTimeControl CssClassTextBox="ms-input" ID="DTCTime" Runat="server" />
	            </Template_control>
            </wssuc:InputFormControl>          
		</Template_InputFormControls>
	</wssuc:InputFormSection>         
	<wssuc:ButtonSection runat="server">
		<Template_Buttons>
			<span runat="server">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnCloneSchedule_Click" Text="Clone Schedule" id="BtnCloneSchedule" />
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnCloneOneTime_Click" Text="Clone One-time" id="BtnCloneOneTime" />
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnExecute_Click" Text="Execute" id="BtnExecute" />
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnDelete_Click" Text="Delete" id="BtnDelete" />
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnSaveJob_Click" Text="<%$Resources:wss,multipages_okbutton_text%>" id="BtnEditJob" accesskey="<%$Resources:wss,okbutton_accesskey%>"/>
		</Template_Buttons>
	</wssuc:ButtonSection>
   </table>

</asp:content>
